import ReactDOM from "react-dom/client";
import Router from "./router";
import "./assets/css/index.css";
import "@/assets/css/antd.less";
import "@/assets/css/public.less";
import "@/assets/css/theme-color.less";
import "@/assets/css/scrollbar.less";
import "uno.css";
import "nprogress/nprogress.css";

// 国际化i18n
import "./locales/config";

// 样式  兼容低版本浏览器
import { StyleProvider, legacyLogicalPropertiesTransformer } from "@ant-design/cssinjs";

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
    <StyleProvider hashPriority="high" transformers={[legacyLogicalPropertiesTransformer]}>
        <Router />
    </StyleProvider>
);

// 关闭loading
const firstElement = document.getElementById("first");
if (firstElement && firstElement.style?.display !== "none") {
    firstElement.style.display = "none";
}
